<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>节点操作</title>
</head>
<body>

<script>

    var ul = document.createElement("ul");
    var li = document.createElement("li");
    li.innerText = "郑州市";
    var li2 = document.createElement("li");
    li2.innerHTML = "安阳市";
    var li3 = document.createElement("li");
    var textNode = document.createTextNode("开封市");
    li3.append(textNode);
    ul.appendChild(li);
    ul.appendChild(li2);
    ul.appendChild(li3);
    var body = document.getElementsByTagName("body")[0];
    body.appendChild(ul);
    //删除一行
    ul.removeChild(li3);
</script>
</body>
</html>